import request from '@/utils/request'

// 查询所有用户
// export function getUserAll () {
//   return request({
//     url: '/ums/user/getall',
//     method: 'get'
//   })
// }
export function getAllUser (current, size, search) {
  return request(({
    url: '/ums/user/getall',
    method: 'get',
    params: {
      pageNum: current,
      pageSize: size,
      search: search
    }
  }))
}

export function getallSuper (current, size, search) {
  return request(({
    url: '/ums/user/getallSuper',
    method: 'get',
    params: {
      pageNum: current,
      pageSize: size,
      search: search
    }
  }))
}

/* ...................... */
// 用户主页
export function getInfoByName (username, page, size) {
  return request({
    url: '/ums/user/' + username,
    method: 'get',
    params: {
      pageNo: page,
      size: size
    }
  })
}
// 用户主页
export function getInfo () {
  return request({
    url: '/ums/user/info',
    method: 'get'
  })
}
// 更新
export function update (user) {
  return request({
    url: '/ums/user/update',
    method: 'post',
    data: user
  })
}

export function GetTopUserScore () {
  return request({
    url: '/ums/user/TopUserScore',
    method: 'get'
  })
}
